package com.lie.prepare.sort.util;

import com.lie.prepare.util.Print;
import org.junit.Test;

import java.util.Arrays;
import java.util.Random;

/**
 * Created by lie on 2018/4/16.
 */
public class MyArrayHelper {

    private static void printArray(int[] array){
        Print.print(Arrays.toString(array));
    }

    public static void printArraySort(int[] array){
        Print.print("排序后 = " + Arrays.toString(array));
    }

    static final Random random = new Random(47);
    static int[] array = new int[10];

    static {
        for (int i = 0; i < array.length; i++) {
            array[i] = random.nextInt(10);
        }
    }

    public static int[] getArray(){
        printArray(MyArrayHelper.array);
        return MyArrayHelper.array;
    }


    @Test
    public void test(){
        int[] array = getArray();
        printArray(array);
    }
}
